<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DirectObject test</title>
</head>
<script lang="javascript" src="/DirectObject/genScript/java.util.ArrayList"></script>
<script lang="javascript" src="/DirectObject/genScript/org.voovan.test.vestful.TestClass"></script>
<script lang="javascript" >
    arraylist1 = null;
    arraylist2 = null;
    function test(){
        if(arraylist1 == null){
           arraylist1 = new ArrayList();
        }

        if(arraylist2 == null){
            arraylist2 = new ArrayList();
        }
        console.log("add item into arraylist1");
        arraylist1.add("aaaa");
        console.log("add item into arraylist2");
        arraylist2.add("bbbb");

        console.log("arraylist1 current size: " + arraylist1.size());
        console.log("arraylist2 current size: " + arraylist2.size());

        console.log("add arraylist2 all item into arraylist1");
        arraylist1.addAll(arraylist2)
        console.log("arraylist1 current size: " + arraylist1.size());
    }

</script>
<body>
<input type="button" onclick="test()" value="Test"/>
</body>
</html>